﻿@model IEnumerable<HdipCricketClub.Models.Team>

@{
    ViewBag.Title = "Teams:";
}

<h2>@ViewBag.Title</h2>

<table>
    <tr>
        <th>
            Name:
        </th>
        <th>
            Captain:
        </th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Member.first_name) @Html.DisplayFor(modelItem => item.Member.last_name)
        </td>
    </tr>
}

</table>
